package com.chuantou.yuba.db.columns;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import android.net.Uri;

import com.chuantou.yuba.provider.DatabaseProvider;

public class CoverColumns extends DataBaseColumns {

	public static final String TABLE_NAME = "cover";

	public static final Uri CONTENT_URI = Uri.parse("content://" + DatabaseProvider.AUTHORITY + "/" + TABLE_NAME);

	private static final HashMap<String, String> TABLE_CREATER = new LinkedHashMap<String, String>();

	/** 图片地址 **/
	public static final String URL = "URL";

	/** 图片流 **/
	public static final String DATA = "DATA";

	/** 图片字节数 **/
	public static final String DATA_COUNT = "data_count";

	public static String[] getSimpleProjection() {
		return new String[] { _ID, URL, DATA_COUNT };
	}

	@Override
	public String getTableName() {
		return TABLE_NAME;
	}

	@Override
	protected Map<String, String> getTableMap() {
		TABLE_CREATER.put(_ID, "long primary key");
		TABLE_CREATER.put(URL, "text");
		TABLE_CREATER.put(DATA, "blob");
		TABLE_CREATER.put(DATA_COUNT, "long default 0");
		return TABLE_CREATER;
	}

}
